package com.example.testenum;

/**
 * Created by admin on 2018/6/5.
 */
public enum EnumDemo {
    FIRST{
        @Override
        public String getInfo() {
            return "FIRST";
        }
    },
    SECOND{
        @Override
        public String getInfo() {
            return "SECOND";
        }
    };

    /**
     * 定义抽象方法
     * @return
     */
    public abstract String getInfo();

    public static void main(String[] args) {
        System.out.println("F:"+EnumDemo.FIRST.getInfo());
        System.out.println("S:"+EnumDemo.SECOND.getInfo());
    }



}
